package com.ibm.db2oncampus.portal.usuario.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.application.FacesMessage;
import javax.faces.component.html.HtmlInputText;
import javax.faces.component.html.HtmlSelectBooleanCheckbox;
import javax.faces.component.html.HtmlSelectOneMenu;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;

import org.richfaces.component.html.HtmlCalendar;

import com.ibm.db2oncampus.portal.framework.beans.FacesBeanSupport;
import com.ibm.db2oncampus.portal.usuario.domain.Certification;
import com.ibm.db2oncampus.portal.usuario.domain.Experience;
import com.ibm.db2oncampus.portal.usuario.domain.Graduation;
import com.ibm.db2oncampus.portal.usuario.domain.Job;
import com.ibm.db2oncampus.portal.usuario.domain.OtherSkill;
import com.ibm.db2oncampus.portal.usuario.service.PersonService;
import com.ibm.db2oncampus.portal.util.JSFUtil;

public class ExperienceBean extends FacesBeanSupport implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private PersonService personService;
	private PersonBean personBean;
	
	private Job currentJobExperience = new Job();
	private Graduation currentGraduationExperience = new Graduation();
	private Certification currentCertificationExperience = new Certification();
	private OtherSkill currentOtherSkillExperience = new OtherSkill();
	
	//Fields for Job on Modal Panel
	private HtmlInputText modalJobExperienceInstitution = new HtmlInputText();
	private HtmlInputText modalJobExperiencePosition = new HtmlInputText();
	private HtmlInputText modalJobExperienceDescription = new HtmlInputText();
	private HtmlCalendar modalJobExperienceStartDate = new HtmlCalendar();
	private HtmlCalendar modalJobExperienceEndDate = new HtmlCalendar();
	private HtmlInputText modalJobExperienceSkillsUsed = new HtmlInputText();
	
	// Fields for Graduation on Modal Panel
	private HtmlInputText modalGraduationInstitution = new HtmlInputText();
	private HtmlInputText modalGraduationExperienceCourseName = new HtmlInputText();
	private HtmlSelectOneMenu modalGraduationCourseLevel = new HtmlSelectOneMenu();
	private HtmlCalendar modalGraduationStartDate = new HtmlCalendar();
	private HtmlCalendar modalGraduationEndDate = new HtmlCalendar();
	
	// Fields for Certification on Modal Panel
	private HtmlInputText modalCertificationInstitution = new HtmlInputText();
	private HtmlInputText modalCertificationSkillName = new HtmlInputText();
	private HtmlCalendar modalCertificationStartDate = new HtmlCalendar();
	private HtmlSelectBooleanCheckbox modalCertificationIsExpirable = new HtmlSelectBooleanCheckbox();
	private HtmlCalendar modalCertificationEndDate = new HtmlCalendar();
	
	// Fields for Other Skill on Modal Panel
	private HtmlInputText modalOtherSkillInstitution = new HtmlInputText();
	private HtmlInputText modalOtherSkillDescription = new HtmlInputText();
	private HtmlCalendar modalOtherSkillStartDate = new HtmlCalendar();
	private HtmlCalendar modalOtherSkillEndDate = new HtmlCalendar();
	
	private boolean modalPanelValid = true;
	
	private String graduationLevel;
	
	public void removeExperienceFromUser() {
		Long selectedExperienceId = Long.parseLong(this.getRequest().getParameter("selectedExperienceId").toString());
		Experience selectedExperience = null;
		
		for(Experience e : this.getPersonBean().getPerson().getExperience()) {
			if(e.getExperienceId().equals(selectedExperienceId)) {
				selectedExperience = e;
				break;
			}
		}
		
		this.getPersonBean().getPerson().getExperience().remove(selectedExperience);
		this.addMessage("Experience removed from " + this.getPersonBean().getPerson().getUserId() + " successfully", null);
		
	}
	
	// Job
	public void newJob() {
		this.setCurrentJobExperience(null);
		this.getModalJobExperienceInstitution().setValue(null);
		this.getModalJobExperiencePosition().setValue(null);
		this.getModalJobExperienceDescription().setValue(null);
		this.getModalJobExperienceStartDate().setValue(null);
		this.getModalJobExperienceEndDate().setValue(null);
		this.getModalJobExperienceSkillsUsed().setValue(null);
	}
	
	public void addJobExperienceToUser() {
		
		if(this.getCurrentJobExperience().getInstitutionName() == null || "".equals(this.getCurrentJobExperience().getInstitutionName())) {
			JSFUtil.addGlobalMessage("Institution name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentJobExperience().getPosition() == null || "".equals(this.getCurrentJobExperience().getPosition())) {
			JSFUtil.addGlobalMessage("Position is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentJobExperience().getStartDate() == null) {
			JSFUtil.addGlobalMessage("Start date is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentJobExperience().getStartDate() != null && this.getCurrentJobExperience().getEndDate() != null && this.getCurrentJobExperience().getStartDate().after(this.getCurrentJobExperience().getEndDate())) {
			JSFUtil.addGlobalMessage("Start Date cannot be after End Date");
			this.setModalPanelValid(false);
		}
		
		if(this.isModalPanelValid()) {
			if(this.getCurrentJobExperience().getExperienceId() != null && this.getCurrentJobExperience().getExperienceId() > 0) {
				this.getPersonBean().getPerson().getExperience().remove(this.getCurrentJobExperience());
				
				this.getCurrentJobExperience().setPerson(this.getPersonBean().getPerson());
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentJobExperience());
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience at " + this.getCurrentJobExperience().getInstitutionName() + " updated successfully"));
			} else {
				this.getCurrentJobExperience().setPerson(this.getPersonBean().getPerson());
				this.getCurrentJobExperience().setEnteredExperience(true);
				this.getCurrentJobExperience().setExperienceId(new Long(this.getPersonBean().getPerson().getExperience().size() * -1));
				
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentJobExperience());
				
				this.setCurrentJobExperience(null);
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience added to " + this.getPersonBean().getPerson().getUserId() + " successfully"));
				
			}
		}
	}

	public void openEditJobExperienceForUser() {
		Long selectedExperienceId = Long.parseLong(JSFUtil.getRequestParameter("jobId").toString());
		
		Job selectedExperience = null;
		
		if(selectedExperienceId > 0) {
			selectedExperience = (Job) personService.findExperienceById(selectedExperienceId);
		} else {
			for(Experience e : this.getPersonBean().getPerson().getExperience()) {
				if(e.getExperienceId().equals(selectedExperienceId)) {
					selectedExperience = (Job) e;
					break;
				}
			}
		}
		
		this.setCurrentJobExperience(selectedExperience);
		
		this.getModalJobExperienceInstitution().setValue(selectedExperience.getInstitutionName());
		this.getModalJobExperiencePosition().setValue(selectedExperience.getPosition());
		this.getModalJobExperienceDescription().setValue(selectedExperience.getPositionDescription());
		this.getModalJobExperienceStartDate().setValue(selectedExperience.getStartDate());
		this.getModalJobExperienceEndDate().setValue(selectedExperience.getEndDate());
		this.getModalJobExperienceSkillsUsed().setValue(selectedExperience.getSkillsUsed());
		
	}
	
	// Graduation
	public void newGraduation() {
		this.setCurrentGraduationExperience(null);
		this.getModalGraduationInstitution().setValue(null);
		this.getModalGraduationExperienceCourseName().setValue(null);
		this.getModalGraduationCourseLevel().setValue(null);
		this.getModalGraduationStartDate().setValue(null);
		this.getModalGraduationEndDate().setValue(null);
	}
	
	public void addGraduationExperienceToUser() {
		
		if(this.getCurrentGraduationExperience().getInstitutionName() == null || "".equals(this.getCurrentGraduationExperience().getInstitutionName())) {
			JSFUtil.addGlobalMessage("Institution name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentGraduationExperience().getCourseName() == null || "".equals(this.getCurrentGraduationExperience().getCourseName())) {
			JSFUtil.addGlobalMessage("Course name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getGraduationLevel() == null || "".equals(this.getGraduationLevel())) {
			JSFUtil.addGlobalMessage("Graduation level is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentGraduationExperience().getStartDate() == null) {
			JSFUtil.addGlobalMessage("Start date is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentGraduationExperience().getStartDate() != null && this.getCurrentGraduationExperience().getEndDate() != null && this.getCurrentGraduationExperience().getStartDate().after(this.getCurrentGraduationExperience().getEndDate())) {
			JSFUtil.addGlobalMessage("Start Date cannot be after End Date");
			this.setModalPanelValid(false);
		}
		
		if(this.isModalPanelValid()) {
			if(this.getCurrentGraduationExperience().getExperienceId() != null && this.getCurrentGraduationExperience().getExperienceId() > 0) {
				this.getPersonBean().getPerson().getExperience().remove(this.getCurrentGraduationExperience());
				
				this.getCurrentGraduationExperience().setGraduationLevel(this.getGraduationLevel());
				this.getCurrentGraduationExperience().setPerson(this.getPersonBean().getPerson());
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentGraduationExperience());
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience at " + this.getCurrentGraduationExperience().getInstitutionName() + " updated successfully"));
			} else {
				this.getCurrentGraduationExperience().setPerson(this.getPersonBean().getPerson());
				this.getCurrentGraduationExperience().setEnteredExperience(true);
				this.getCurrentGraduationExperience().setGraduationLevel(this.getGraduationLevel());
				this.getCurrentGraduationExperience().setExperienceId(new Long(this.getPersonBean().getPerson().getExperience().size() * -1));
				
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentGraduationExperience());
				
				this.setCurrentGraduationExperience(null);
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience added to " + this.getPersonBean().getPerson().getUserId() + " successfully"));
				
			}
		}
	}
	
	public void openEditGraduationForUser() {
		Long selectedExperienceId = Long.parseLong(JSFUtil.getRequestParameter("graduationId").toString());
		
		Graduation selectedExperience = null;
		
		if(selectedExperienceId > 0) {
			selectedExperience = (Graduation) personService.findExperienceById(selectedExperienceId);
		} else {
			for(Experience e : this.getPersonBean().getPerson().getExperience()) {
				if(e.getExperienceId().equals(selectedExperienceId)) {
					selectedExperience = (Graduation) e;
					break;
				}
			}
		}
		
		this.setCurrentGraduationExperience(selectedExperience);
		
		this.setGraduationLevel(selectedExperience.getGraduationLevel());
		this.getModalGraduationInstitution().setValue(selectedExperience.getInstitutionName());
		this.getModalGraduationExperienceCourseName().setValue(selectedExperience.getCourseName());
		this.getModalGraduationCourseLevel().setValue(selectedExperience.getGraduationLevel());
		this.getModalGraduationStartDate().setValue(selectedExperience.getStartDate());
		this.getModalGraduationEndDate().setValue(selectedExperience.getEndDate());
		
	}
	
	// Certification
	public void newCertification() {
		this.setCurrentCertificationExperience(null);
		this.getModalCertificationInstitution().setValue(null);
		this.getModalCertificationSkillName().setValue(null);
		this.getModalCertificationStartDate().setValue(null);
		this.getModalCertificationIsExpirable().setValue(null);
		this.getModalCertificationEndDate().setValue(null);
	}
	
	public void addCertificationExperienceToUser() {
		
		if(this.getCurrentCertificationExperience().getInstitutionName() == null || "".equals(this.getCurrentCertificationExperience().getInstitutionName())) {
			JSFUtil.addGlobalMessage("Institution name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentCertificationExperience().getSkillName() == null || "".equals(this.getCurrentCertificationExperience().getSkillName())) {
			JSFUtil.addGlobalMessage("Skill name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentCertificationExperience().getStartDate() == null) {
			JSFUtil.addGlobalMessage("Start date is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentCertificationExperience().getExpirable() && (this.getCurrentCertificationExperience().getEndDate() == null)) {
			JSFUtil.addGlobalMessage("For certifications that are expirable, End Date cannot be blank.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentCertificationExperience().getStartDate() != null && this.getCurrentCertificationExperience().getEndDate() != null && this.getCurrentCertificationExperience().getStartDate().after(this.getCurrentCertificationExperience().getEndDate())) {
			JSFUtil.addGlobalMessage("Start Date cannot be after End Date");
			this.setModalPanelValid(false);
		}
		
		if(this.isModalPanelValid()) {
			if(this.getCurrentCertificationExperience().getExperienceId() != null && this.getCurrentCertificationExperience().getExperienceId() > 0) {
				this.getPersonBean().getPerson().getExperience().remove(this.getCurrentCertificationExperience());
				
				this.getCurrentCertificationExperience().setPerson(this.getPersonBean().getPerson());
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentCertificationExperience());
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience at " + this.getCurrentCertificationExperience().getInstitutionName() + " updated successfully"));
			} else {
				this.getCurrentCertificationExperience().setPerson(this.getPersonBean().getPerson());
				this.getCurrentCertificationExperience().setEnteredExperience(true);
				this.getCurrentCertificationExperience().setExperienceId(new Long(this.getPersonBean().getPerson().getExperience().size() * -1));
				
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentCertificationExperience());
				
				this.setCurrentCertificationExperience(null);
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience added to " + this.getPersonBean().getPerson().getUserId() + " successfully"));
				
			}
		}
	}
	
	public void openEditCertificationForUser() {
		Long selectedExperienceId = Long.parseLong(JSFUtil.getRequestParameter("certificationId").toString());
		
		Certification selectedExperience = null;
		
		if(selectedExperienceId > 0) {
			selectedExperience = (Certification) personService.findExperienceById(selectedExperienceId);
		} else {
			for(Experience e : this.getPersonBean().getPerson().getExperience()) {
				if(e.getExperienceId().equals(selectedExperienceId)) {
					selectedExperience = (Certification) e;
					break;
				}
			}
		}
		
		this.setCurrentCertificationExperience(selectedExperience);
		
		this.getModalCertificationInstitution().setValue(selectedExperience.getInstitutionName());
		this.getModalCertificationSkillName().setValue(selectedExperience.getSkillName());
		this.getModalCertificationStartDate().setValue(selectedExperience.getStartDate());
		this.getModalCertificationIsExpirable().setValue(selectedExperience.getExpirable());
		this.getModalCertificationEndDate().setValue(selectedExperience.getEndDate());
		
	}
	
	// Other Skills
	public void newOtherSkill() {
		this.setCurrentOtherSkillExperience(null);
		this.getModalOtherSkillInstitution().setValue(null);
		this.getModalOtherSkillDescription().setValue(null);
		this.getModalOtherSkillStartDate().setValue(null);
		this.getModalOtherSkillEndDate().setValue(null);
	}
	
	public void addOtherSkillExperienceToUser() {
		
		if(this.getCurrentOtherSkillExperience().getInstitutionName() == null || "".equals(this.getCurrentOtherSkillExperience().getInstitutionName())) {
			JSFUtil.addGlobalMessage("Institution name is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentOtherSkillExperience().getStartDate() == null) {
			JSFUtil.addGlobalMessage("Start date is a required field, please fill it.");
			this.setModalPanelValid(false);
		}
		
		if(this.getCurrentOtherSkillExperience().getStartDate() != null && this.getCurrentOtherSkillExperience().getEndDate() != null && this.getCurrentOtherSkillExperience().getStartDate().after(this.getCurrentOtherSkillExperience().getEndDate())) {
			JSFUtil.addGlobalMessage("Start Date cannot be after End Date");
			this.setModalPanelValid(false);
		}
		
		if(this.isModalPanelValid()) {
			if(this.getCurrentOtherSkillExperience().getExperienceId() != null && this.getCurrentOtherSkillExperience().getExperienceId() > 0) {
				this.getPersonBean().getPerson().getExperience().remove(this.getCurrentOtherSkillExperience());
				
				this.getCurrentOtherSkillExperience().setPerson(this.getPersonBean().getPerson());
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentOtherSkillExperience());
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience at " + this.getCurrentOtherSkillExperience().getInstitutionName() + " updated successfully"));
			} else {
				this.getCurrentOtherSkillExperience().setPerson(this.getPersonBean().getPerson());
				this.getCurrentOtherSkillExperience().setEnteredExperience(true);
				this.getCurrentOtherSkillExperience().setExperienceId(new Long(this.getPersonBean().getPerson().getExperience().size() * -1));
				
				this.getPersonBean().getPerson().getExperience().add(this.getCurrentOtherSkillExperience());
				
				this.setCurrentOtherSkillExperience(null);
				
				this.getFacesContext().addMessage("experienceListForm", new FacesMessage("Experience added to " + this.getPersonBean().getPerson().getUserId() + " successfully"));
				
			}
		}
	}
	
	public void openEditOtherSkillForUser() {
		Long selectedExperienceId = Long.parseLong(JSFUtil.getRequestParameter("otherSkillId").toString());
		
		OtherSkill selectedExperience = null;
		
		if(selectedExperienceId > 0) {
			selectedExperience = (OtherSkill) personService.findExperienceById(selectedExperienceId);
		} else {
			for(Experience e : this.getPersonBean().getPerson().getExperience()) {
				if(e.getExperienceId().equals(selectedExperienceId)) {
					selectedExperience = (OtherSkill) e;
					break;
				}
			}
		}
		
		this.setCurrentOtherSkillExperience(selectedExperience);
		this.getModalOtherSkillInstitution().setValue(selectedExperience.getInstitutionName());
		this.getModalOtherSkillDescription().setValue(selectedExperience.getDescription());
		this.getModalOtherSkillStartDate().setValue(selectedExperience.getStartDate());
		this.getModalOtherSkillEndDate().setValue(selectedExperience.getEndDate());
		
	}
	
	public DataModel getExperiencesDataModel() {
		DataModel experienceDataModel = new ListDataModel();
		
		List<Experience> experiences = new ArrayList<Experience>(this.getPersonBean().getPerson().getExperience());
		
		experienceDataModel.setWrappedData(experiences);
		return experienceDataModel;
	}
	
	//Getters and Setters
	
	public PersonService getPersonService() {
		return personService;
	}
	public void setPersonService(PersonService personService) {
		this.personService = personService;
	}

	public PersonBean getPersonBean() {
		return personBean;
	}

	public void setPersonBean(PersonBean personBean) {
		this.personBean = personBean;
	}

	public HtmlInputText getModalJobExperienceInstitution() {
		return modalJobExperienceInstitution;
	}

	public void setModalJobExperienceInstitution(
			HtmlInputText modalJobExperienceInstitution) {
		this.modalJobExperienceInstitution = modalJobExperienceInstitution;
	}

	public HtmlInputText getModalJobExperiencePosition() {
		return modalJobExperiencePosition;
	}

	public void setModalJobExperiencePosition(
			HtmlInputText modalJobExperiencePosition) {
		this.modalJobExperiencePosition = modalJobExperiencePosition;
	}

	public HtmlInputText getModalJobExperienceDescription() {
		return modalJobExperienceDescription;
	}

	public void setModalJobExperienceDescription(
			HtmlInputText modalJobExperienceDescription) {
		this.modalJobExperienceDescription = modalJobExperienceDescription;
	}

	public HtmlCalendar getModalJobExperienceStartDate() {
		return modalJobExperienceStartDate;
	}

	public void setModalJobExperienceStartDate(
			HtmlCalendar modalJobExperienceStartDate) {
		this.modalJobExperienceStartDate = modalJobExperienceStartDate;
	}

	public HtmlCalendar getModalJobExperienceEndDate() {
		return modalJobExperienceEndDate;
	}

	public void setModalJobExperienceEndDate(HtmlCalendar modalJobExperienceEndDate) {
		this.modalJobExperienceEndDate = modalJobExperienceEndDate;
	}

	public HtmlInputText getModalJobExperienceSkillsUsed() {
		return modalJobExperienceSkillsUsed;
	}

	public void setModalJobExperienceSkillsUsed(HtmlInputText modalJobExperienceSkillsUsed) {
		this.modalJobExperienceSkillsUsed = modalJobExperienceSkillsUsed;
	}
	
	public Job getCurrentJobExperience() {
		return currentJobExperience;
	}

	public void setCurrentJobExperience(Job currentJobExperience) {
		this.currentJobExperience = currentJobExperience;
	}
	
	public Graduation getCurrentGraduationExperience() {
		return currentGraduationExperience;
	}

	public void setCurrentGraduationExperience(
			Graduation currentGraduationExperience) {
		this.currentGraduationExperience = currentGraduationExperience;
	}

	public Certification getCurrentCertificationExperience() {
		return currentCertificationExperience;
	}

	public void setCurrentCertificationExperience(
			Certification currentCertificationExperience) {
		this.currentCertificationExperience = currentCertificationExperience;
	}

	public OtherSkill getCurrentOtherSkillExperience() {
		return currentOtherSkillExperience;
	}

	public void setCurrentOtherSkillExperience(
			OtherSkill currentOtherSkillExperience) {
		this.currentOtherSkillExperience = currentOtherSkillExperience;
	}

	public HtmlInputText getModalGraduationInstitution() {
		return modalGraduationInstitution;
	}

	public void setModalGraduationInstitution(
			HtmlInputText modalGraduationInstitution) {
		this.modalGraduationInstitution = modalGraduationInstitution;
	}

	public HtmlInputText getModalGraduationExperienceCourseName() {
		return modalGraduationExperienceCourseName;
	}

	public void setModalGraduationExperienceCourseName(
			HtmlInputText modalGraduationExperienceCourseName) {
		this.modalGraduationExperienceCourseName = modalGraduationExperienceCourseName;
	}

	public HtmlSelectOneMenu getModalGraduationCourseLevel() {
		return modalGraduationCourseLevel;
	}

	public void setModalGraduationCourseLevel(
			HtmlSelectOneMenu modalGraduationCourseLevel) {
		this.modalGraduationCourseLevel = modalGraduationCourseLevel;
	}

	public HtmlCalendar getModalGraduationStartDate() {
		return modalGraduationStartDate;
	}

	public void setModalGraduationStartDate(HtmlCalendar modalGraduationStartDate) {
		this.modalGraduationStartDate = modalGraduationStartDate;
	}

	public HtmlCalendar getModalGraduationEndDate() {
		return modalGraduationEndDate;
	}

	public void setModalGraduationEndDate(HtmlCalendar modalGraduationEndDate) {
		this.modalGraduationEndDate = modalGraduationEndDate;
	}

	public HtmlInputText getModalCertificationInstitution() {
		return modalCertificationInstitution;
	}

	public void setModalCertificationInstitution(
			HtmlInputText modalCertificationInstitution) {
		this.modalCertificationInstitution = modalCertificationInstitution;
	}

	public HtmlCalendar getModalCertificationStartDate() {
		return modalCertificationStartDate;
	}

	public void setModalCertificationStartDate(
			HtmlCalendar modalCertificationStartDate) {
		this.modalCertificationStartDate = modalCertificationStartDate;
	}

	public HtmlSelectBooleanCheckbox getModalCertificationIsExpirable() {
		return modalCertificationIsExpirable;
	}

	public void setModalCertificationIsExpirable(
			HtmlSelectBooleanCheckbox modalCertificationIsExpirable) {
		this.modalCertificationIsExpirable = modalCertificationIsExpirable;
	}

	public HtmlCalendar getModalCertificationEndDate() {
		return modalCertificationEndDate;
	}

	public void setModalCertificationEndDate(HtmlCalendar modalCertificationEndDate) {
		this.modalCertificationEndDate = modalCertificationEndDate;
	}

	public HtmlInputText getModalCertificationSkillName() {
		return modalCertificationSkillName;
	}

	public void setModalCertificationSkillName(
			HtmlInputText modalCertificationSkillName) {
		this.modalCertificationSkillName = modalCertificationSkillName;
	}

	public HtmlInputText getModalOtherSkillInstitution() {
		return modalOtherSkillInstitution;
	}

	public void setModalOtherSkillInstitution(
			HtmlInputText modalOtherSkillInstitution) {
		this.modalOtherSkillInstitution = modalOtherSkillInstitution;
	}

	public HtmlInputText getModalOtherSkillDescription() {
		return modalOtherSkillDescription;
	}

	public void setModalOtherSkillDescription(
			HtmlInputText modalOtherSkillDescription) {
		this.modalOtherSkillDescription = modalOtherSkillDescription;
	}

	public HtmlCalendar getModalOtherSkillStartDate() {
		return modalOtherSkillStartDate;
	}

	public void setModalOtherSkillStartDate(HtmlCalendar modalOtherSkillStartDate) {
		this.modalOtherSkillStartDate = modalOtherSkillStartDate;
	}

	public HtmlCalendar getModalOtherSkillEndDate() {
		return modalOtherSkillEndDate;
	}

	public void setModalOtherSkillEndDate(HtmlCalendar modalOtherSkillEndDate) {
		this.modalOtherSkillEndDate = modalOtherSkillEndDate;
	}

	public boolean isModalPanelValid() {
		return modalPanelValid;
	}

	public void setModalPanelValid(boolean modalPanelValid) {
		this.modalPanelValid = modalPanelValid;
	}

	public String getGraduationLevel() {
		return graduationLevel;
	}

	public void setGraduationLevel(String graduationLevel) {
		this.graduationLevel = graduationLevel;
	}
	

}
